<!DOCTYPE html>
<html>
<head>
    <title>Test</title>
    <script src="jquery-1.6.4.js"></script>
    <script src="base.js"></script>
    <link href="css/lib.css" rel="stylesheet" />
    <script>
        jQuery(function () {
            var container = new Lib.Container({
                id: 'first',
                name: 'ct',
                items: [
                    new Lib.Container({
                        id: 'first-1',
                        items: [
                            new Lib.Container({
                                id: 'first-1-1'
                            })
                        ]
                    }),
                    new Lib.Container({
                        id: 'first-2'
                    })
                ]
            });
            var first3 = new Lib.Container({
                id: 'first-3'
            });
            container.add(first3);
            container.render('body').setWidth(100).setHeight(100);
            console.log(container);
            console.log(first3);

            var btn = new Lib.Button({
                text: '按钮'
            });
            btn.render('body');

            var panel = new Lib.Panel({});
            panel.setHeight(100).setWidth(100).render('body');

        });

        var showMask = function () {
            var mask = new Lib.Mask();
            mask.render('body');
        };

        var showWindow = function () {
            var win = new Lib.window.Window({
                title: '测试窗口',
                height: 200,
                buttons: [
                    {
                        text: '确定',
                        handler: function () {
                            alert('ok');
                        }
                    },
                    {
                        text: '关闭',
                        handler: function () {
                            win.close();
                        }
                    }
                ],
                html: 'this is body',
                modal: false
            });
            win.show();
        };
    </script>
</head>
<body>
    <button onclick="showMask()">Click to show Mask</button>
    <button onclick="showWindow()">Click to show Window</button>
</body>
</html>